Daniel Sabo [Wed, 9 Oct 2013 06:17:57 +0000 (23:17 -0700)]
Request a C99 compatible compiler
Daniel Sabo [Sun, 30 Jun 2013 12:12:52 +0000 (05:12 -0700)]
Use SSE2 u16 conversions for gamma <-> gamma
Michael Henning [Sun, 29 Sep 2013 16:48:04 +0000 (12:48 -0400)]
base: For RGB->Y, use sRGB primaries that are adapted to a D50 illuminant.
Thanks to Elle Stone for pointing this out.
Daniel Sabo [Sun, 14 Jul 2013 06:42:08 +0000 (23:42 -0700)]
Increase the precision of ref gamma conversions
Use a 3 round Newtons method for the fast version. This should be
fully accurate for floats in [0, 1], less so for very small values
but they're in the the linear part of the sRGB curve.
For the reference conversions the standard C pow() function is
used, which give accuracy far in excess of anything we need.
Téo Mazars [Sun, 4 Aug 2013 18:14:31 +0000 (20:14 +0200)]
tests: output with more details when grayscale_to_rgb fails
Téo Mazars [Sat, 3 Aug 2013 16:15:15 +0000 (18:15 +0200)]
extensions: Don't perform strict comparisons on floating point values
Téo Mazars [Sun, 30 Jun 2013 15:26:16 +0000 (17:26 +0200)]
extensions: Lab has ab components in [-128, 127]
Téo Mazars [Sun, 30 Jun 2013 13:58:43 +0000 (15:58 +0200)]
extensions: clamping to [0.0, 1.0] is not needed
As babl allows out of sRGB gamut values.
Téo Mazars [Sun, 30 Jun 2013 11:36:00 +0000 (13:36 +0200)]
extensions: do not truncate values to float
Téo Mazars [Thu, 27 Jun 2013 20:21:28 +0000 (22:21 +0200)]
extensions: Add an even more naive CMY color space to naive-CMYK.c
Téo Mazars [Thu, 27 Jun 2013 19:12:53 +0000 (21:12 +0200)]
extensions: naive-CMYK. works perceptually
Téo Mazars [Wed, 26 Jun 2013 21:00:05 +0000 (23:00 +0200)]
extensions: Add the Y'CbCr ITU-R BT.709 Color Space
A variation of the current Y'CbCr (BT.601 or 470?), needed downstream.
Téo Mazars [Mon, 24 Jun 2013 21:01:09 +0000 (23:01 +0200)]
Add hsl tests to gitignore
Téo Mazars [Mon, 24 Jun 2013 20:55:35 +0000 (22:55 +0200)]
extensions: Add the HSL color space
Needed at least as legacy
Téo Mazars [Thu, 20 Jun 2013 20:11:23 +0000 (22:11 +0200)]
extensions: Refactor HSV.c and add the simple "HSV" model
Téo Mazars [Thu, 20 Jun 2013 18:16:17 +0000 (20:16 +0200)]
extensions: Make HSV works on perceptual color space
Daniel Sabo [Tue, 18 Jun 2013 04:48:39 +0000 (21:48 -0700)]
gegl-fixups: Fix warning about ambiguous sign
Daniel Sabo [Tue, 18 Jun 2013 04:33:49 +0000 (21:33 -0700)]
GCC+Win32: Ensure stack alignment in SSE code
Without this option GCC will generate bad code that attempts to
push SSE variables onto an unaligned stack.
Daniel Sabo [Wed, 12 Jun 2013 22:20:10 +0000 (15:20 -0700)]
Use double constants in reference gamma
Daniel Sabo [Mon, 10 Jun 2013 23:51:40 +0000 (16:51 -0700)]
Remove sse-fixups, superseded by sse2-int8
Daniel Sabo [Mon, 10 Jun 2013 23:48:36 +0000 (16:48 -0700)]
Add SSE2 float -> byte conversions
Daniel Sabo [Mon, 10 Jun 2013 16:48:00 +0000 (09:48 -0700)]
Use Loren's gamma conversions for RGB, YA, and Y
Daniel Sabo [Tue, 30 Apr 2013 18:52:51 +0000 (11:52 -0700)]
Lookup table based conversions for cairo-ARGB32
Because who doesn't love giant lookup tables?
Daniel Sabo [Fri, 31 May 2013 22:09:45 +0000 (15:09 -0700)]
Add two-table header to sources
Daniel Sabo [Fri, 31 May 2013 20:35:43 +0000 (13:35 -0700)]
Add two-table gamma conversions
This is kind of a silly conversion method, but it
works and nothing faster has been forthcoming.
Daniel Sabo [Fri, 31 May 2013 20:25:28 +0000 (13:25 -0700)]
Add some float conversions for grey
Loren Merritt [Mon, 29 Apr 2013 09:49:18 +0000 (09:49 +0000)]
SSE2-optimized gamma correction
7x faster than the scalar implementation.
(4x the obvious way from simd, and the other 1.75x because I'm exploiting
knowledge of the ieee754 float format rather than using portable frexp().)
Loren Merritt [Thu, 25 Apr 2013 17:50:53 +0000 (17:50 +0000)]
Optimize gamma correction
Switch from Chebyshev polynomial to Newton's method, which is both simpler and
1.5x faster for the same precision.
Daniel Sabo [Tue, 30 Apr 2013 03:18:07 +0000 (20:18 -0700)]
Remove rgbA float <-> rgba float from gggl-lies
It clamps alpha when babl expects it not to.
Daniel Sabo [Tue, 30 Apr 2013 03:13:10 +0000 (20:13 -0700)]
gggl.c: Remove dead code
Daniel Sabo [Tue, 30 Apr 2013 02:59:15 +0000 (19:59 -0700)]
gggl-lies.c: Remove dead code
Daniel Sabo [Tue, 30 Apr 2013 02:43:41 +0000 (19:43 -0700)]
Show the details of the fish that caused a failure
Daniel Sabo [Tue, 30 Apr 2013 01:10:25 +0000 (18:10 -0700)]
Re-enable gggl-lies
It was not the source of the troubles I had blamed it for.
Michael Natterer [Sun, 7 Apr 2013 15:27:34 +0000 (17:27 +0200)]
tests: fix the HSV tests
Michael Natterer [Sun, 7 Apr 2013 14:04:49 +0000 (16:04 +0200)]
extensions: HSV.o: return the number of samples processed, not always 0
Michael Natterer [Sun, 7 Apr 2013 13:58:16 +0000 (15:58 +0200)]
extensions: change the range of H in HSV.o from 0..360 to 0..1
Daniel Sabo [Sat, 6 Apr 2013 09:13:11 +0000 (02:13 -0700)]
Fix missing AC_MSG_RESULT
Daniel Sabo [Sat, 6 Apr 2013 03:11:03 +0000 (20:11 -0700)]
Use QueryPerformanceCounter for babl_ticks on Win32
Daniel Sabo [Sat, 30 Mar 2013 15:48:52 +0000 (08:48 -0700)]
Add SSE2 conversions
This patch includes two conversions for RaGaBaA -> RGBA. Depending
on the CPU either spin or shuffle is significantly faster. Unless
I can find a consistently fast version I'm going to let them fight
it out in the babl startup benchmarks.
Daniel Sabo [Sat, 6 Apr 2013 03:47:56 +0000 (20:47 -0700)]
Disable gegl-lies conversions
They lazy table generation these conversions use causes
babl to overestimate their cost while also overestimating
their accuracy.
I used "#if 0" rather than disabling the library because I
want to ensure the conversion gets removed without people
needing to do rm lib/babl-0.1/*
Daniel Sabo [Sat, 6 Apr 2013 03:45:00 +0000 (20:45 -0700)]
Remove duplicate conversions in gggl and gggl-lies
Daniel Sabo [Sat, 30 Mar 2013 03:14:40 +0000 (20:14 -0700)]
Remove gggl rgbA <-> rgba
Daniel Sabo [Wed, 30 Jan 2013 02:41:44 +0000 (18:41 -0800)]
Minimal float -> u8, u16 conversions
Add some simplistic but "accurate" float -> u8 and float -> u16
conversions to make more non-reference paths usable.
The main difference from the existing conversions is that these
clamp out of range values and make the path error checker happy.
I also had to fudge the float-to-8bit slightly because the prior
values cause it to check for the rounding on an exact 0.5 value.
Daniel Sabo [Thu, 7 Feb 2013 19:24:12 +0000 (11:24 -0800)]
Add --disable-docs option to configure
Daniel Sabo [Tue, 29 Jan 2013 10:13:24 +0000 (02:13 -0800)]
Add introspection function for BablFishPath
Daniel Sabo [Tue, 29 Jan 2013 00:26:56 +0000 (16:26 -0800)]
Install babl-introspect.h
Daniel Sabo [Sun, 9 Dec 2012 20:48:32 +0000 (12:48 -0800)]
Fix babl-stats page encoding for Firefox
Add <meta Content-Type> to babl-stats.html so Firefox renders
it with the correct encoding.
Massimo Valentini [Wed, 5 Dec 2012 18:22:36 +0000 (19:22 +0100)]
babl: always allocate enough memory
Massimo Valentini [Wed, 5 Dec 2012 17:52:16 +0000 (18:52 +0100)]
babl: don't crash processing same format models
with different component number
Massimo Valentini [Wed, 5 Dec 2012 17:52:03 +0000 (18:52 +0100)]
babl: fix conversion path cost evaluation
and silence compiler warnings
Jehan [Mon, 26 Nov 2012 11:51:17 +0000 (20:51 +0900)]
Update tests/ gitignore.
Massimo Valentini [Fri, 24 Aug 2012 08:06:01 +0000 (10:06 +0200)]
Revert "tests: adjust float to 8bit regression test for new sRGB precision"
This reverts commit
2675787f341ce259f9abec3e326b5efece45ecbf.
the literal 0.3 assigned to a float is approximated to a number
slightly greater than 0.3 (3/10) ->
lrint ((0.3 + epsilon) * 255) == lrint (76.5 + 255 * epsilon) == 77
Jehan [Tue, 20 Nov 2012 16:10:22 +0000 (01:10 +0900)]
AUTHORS: markup and email fix.
Jehan [Tue, 20 Nov 2012 16:06:06 +0000 (01:06 +0900)]
Bug 688217 - cleaning out an unneeded include of stdint.h.
Øyvind Kolås [Mon, 19 Nov 2012 20:39:43 +0000 (21:39 +0100)]
AUTHORS: markup fixup
Øyvind Kolås [Mon, 19 Nov 2012 01:32:44 +0000 (02:32 +0100)]
update AUTHORS file
Jehan [Wed, 14 Nov 2012 04:26:06 +0000 (13:26 +0900)]
Bug 688217 - relies on actual DLL path for locating lib directory on Windows.
Øyvind Kolås [Wed, 14 Nov 2012 01:02:00 +0000 (02:02 +0100)]
get rid of process_chunks
Øyvind Kolås [Wed, 14 Nov 2012 00:36:50 +0000 (01:36 +0100)]
Move chuking of stack allocated buffer to innermost loop
Moves the logic to the only place where it is needed, speeding up the other,
more likely and hopeful code path by not needing to do the conditionals at
all.
Øyvind Kolås [Tue, 13 Nov 2012 22:06:21 +0000 (23:06 +0100)]
Michael Henning <drawoc@darkrefraction.com>
Clean up babl_process_chunks a bit.
Øyvind Kolås [Sat, 27 Oct 2012 23:08:56 +0000 (01:08 +0200)]
lower max stack alloced buffer size to 14000px (for win32)
Øyvind Kolås [Sat, 27 Oct 2012 20:17:34 +0000 (22:17 +0200)]
reduce size of max tempbuffer, and do chunking in fewer cases
Chunking is now only done for multi-step fish paths and reference conversions.
Øyvind Kolås [Sat, 27 Oct 2012 17:47:52 +0000 (19:47 +0200)]
Limit the size of temporary buffers used by babl.
This might fix the issue reported in Bug 686557, though more logic can be
applied, only do this if it is a multi-step conversion and temporary buffers
would actually be needed.
Michael Muré [Tue, 28 Aug 2012 07:02:31 +0000 (16:02 +0900)]
HSV and test: minor style cleaning before merge
Maxime Nicco [Fri, 27 Jul 2012 10:57:52 +0000 (12:57 +0200)]
HSV test
Factorize code
Maxime Nicco [Thu, 26 Jul 2012 16:05:51 +0000 (18:05 +0200)]
HSV add test
Maxime Nicco [Thu, 26 Jul 2012 16:02:38 +0000 (18:02 +0200)]
HSV fix Makefile
Maxime Nicco [Wed, 25 Jul 2012 10:04:55 +0000 (12:04 +0200)]
HSV Cleanup
Maxime Nicco [Wed, 25 Jul 2012 10:01:39 +0000 (12:01 +0200)]
Rename Naive-HSV in HSV
Maxime Nicco [Wed, 25 Jul 2012 09:32:31 +0000 (11:32 +0200)]
Adding HSV Conversion
implement conversion between rvba and hsvba float
Øyvind Kolås [Sat, 25 Aug 2012 14:22:20 +0000 (16:22 +0200)]
babl: further increase the number of pixels verified
Øyvind Kolås [Sat, 25 Aug 2012 14:11:23 +0000 (16:11 +0200)]
babl: increase number of pixels in tests ~8 times
This makes 32bit systems also trip up on many more possible !8bpc
discrpeancies.
Øyvind Kolås [Thu, 23 Aug 2012 08:30:32 +0000 (10:30 +0200)]
tests: adjust float to 8bit regression test for new sRGB precision
Øyvind Kolås [Thu, 23 Aug 2012 08:26:29 +0000 (10:26 +0200)]
Adjust constants used for sRGB gamma
Spotted by Elle Stone and clarified by Graeme Gill, now updated to Current IEC
specification values.
Jon Nordby [Wed, 1 Aug 2012 10:49:04 +0000 (12:49 +0200)]
build: Fix distcheck by disting tests/introspection.py
Jon Nordby [Wed, 1 Aug 2012 10:47:00 +0000 (12:47 +0200)]
build: Use 'rsvg-convert' instead of 'rsvg'
rsvg was made obsolete a long time ago by rsvg-convert, and
was removed in librsvg 2.35.2. rsvg-convert is available
from at least librsvg 2.26.2 (Debian Squeeze).
Øyvind Kolås [Tue, 31 Jul 2012 18:53:01 +0000 (20:53 +0200)]
extensions: #define _POSIX_C_SOURCE for lrint
Øyvind Kolås [Tue, 31 Jul 2012 18:45:36 +0000 (20:45 +0200)]
extensions: cairo - remove unused lut_linear table
Jon Nordby [Tue, 31 Jul 2012 16:19:02 +0000 (18:19 +0200)]
introspection: Add GI/GTKDoc style symbol references to comments
Jon Nordby [Mon, 30 Jul 2012 14:35:17 +0000 (16:35 +0200)]
introspection: Pass --warn-all to g-ir-scanner
Jon Nordby [Mon, 30 Jul 2012 14:34:18 +0000 (16:34 +0200)]
configure.ac: Fix typo in check for GI >= 1.33.5
Jon Nordby [Sun, 29 Jul 2012 13:39:27 +0000 (15:39 +0200)]
tests: Add test setup for introspection bindings in Python
This is essentially all we can test for now, as the
methods using the Babl type are show up with 'introspectable="1"'.
Øyvind Kolås [Mon, 30 Jul 2012 20:48:57 +0000 (22:48 +0200)]
extensions: make fastpath for R'G'B'A u8 to cairo-ARGB32 have 0 error
Alexia Death [Fri, 27 Jul 2012 18:49:35 +0000 (21:49 +0300)]
extensions: add fastpath for R'G'B'A u8 to cairo-ARGB32 conversion
Jon Nordby [Sun, 29 Jul 2012 13:06:03 +0000 (15:06 +0200)]
introspection: Babl.BablObject -> Babl.Object
Jon Nordby [Fri, 27 Jul 2012 20:00:46 +0000 (22:00 +0200)]
Bug 673422 - Babl C type not accessible to introspection bindings
https://bugzilla.gnome.org/show_bug.cgi?id=673422
Annotate Babl C type to be Babl.Object in GIR using the
"rename to" annotation in GI 1.33.5+. For earlier versions,
use a static .gir file to achieve the same.
Øyvind Kolås [Fri, 27 Jul 2012 19:13:12 +0000 (21:13 +0200)]
Revert "Add simple test app to test pow-24 accuracy"
commit
dc824c0ac704b35130aff44e544e8666e21b5bc5 which was pushed by accident.
Øyvind Kolås [Fri, 27 Jul 2012 19:09:59 +0000 (21:09 +0200)]
Revert "extensions/gggl{,-lies}.c: do not register the same conversion twice or +"
This reverts commit
bc66f5ae8a98896f360549cb87cbbfae77d176df
The conversions in gggl and gggl-lies are not the same, even though the lines
registering them seem identical; their effect is different since the same
names refer to different pixel formats. Further restructuring these
conversions and getting rid of the gggl legacy naming of them might be
beneficial..
Alexander Larsson [Mon, 18 Jun 2012 13:17:51 +0000 (15:17 +0200)]
Add simple test app to test pow-24 accuracy
https://bugzilla.gnome.org/show_bug.cgi?id=678318
Massimo Valentini [Sat, 14 Jul 2012 15:07:38 +0000 (17:07 +0200)]
extensions/gggl{,-lies}.c: do not register the same conversion twice or +
grep "o (" extensions/gggl.c | sort | uniq -d
grep "o (" extensions/gggl-lies.c | sort | uniq -d
Massimo Valentini [Sat, 14 Jul 2012 15:07:38 +0000 (17:07 +0200)]
extensions/gggl{,-lies}.c: round toward nearest in integer unpremultiplication
from (docs/BablFishPath.html):
../extensions/.libs/gggl-lies.so 0: RaGaBaA u8 to RGBA u8
error: 0.001425 cost: 81 processings: 1 pixels: 128
../extensions/.libs/gggl.so 0: R'aG'aB'aA u8 to R'G'B'A u8
error: 0.001971 cost: 71 processings: 1 pixels: 128
../extensions/.libs/gggl.so 0: R'aG'aB'aA u8 to R'G'B' u8
error: 0.001971 cost: 71 processings: 1 pixels: 128
to:
../extensions/.libs/gggl-lies.so 0: RaGaBaA u8 to RGBA u8
error: 0.000031 cost: 81 processings: 1 pixels: 128
../extensions/.libs/gggl.so 0: R'aG'aB'aA u8 to R'G'B'A u8
error: 0.000042 cost: 61 processings: 1 pixels: 128
../extensions/.libs/gggl.so 0: R'aG'aB'aA u8 to R'G'B' u8
error: 0.000042 cost: 61 processings: 1 pixels: 128
Massimo Valentini [Sat, 14 Jul 2012 15:07:38 +0000 (17:07 +0200)]
extensions/gggl{,-lies}.c: fix a Fixme: (>>8 vs /255)
division per 0x100-1 is implemented using 1 term of (1 + x)^-1
MacLaurin expansion
(1+x)^-1 == 1 + (-1) x
a * (1 - 1/256)^-1 * (256^-1) == (a + a / 256) / 256
with integer division rounded toward the nearest.
Massimo Valentini [Sat, 14 Jul 2012 15:07:38 +0000 (17:07 +0200)]
extensions/gggl{,-lies}.c: use 'lrint' where it is not yet used
and instead of 'rint'.
'lrint' returning a long does not require a conversion double->int
that in theory requires changing the rounding direction from
toward the nearest to toward zero.
Massimo Valentini [Sat, 14 Jul 2012 15:07:38 +0000 (17:07 +0200)]
extensions/gggl{,-lies}.c: fix conversions u16 <-> u8
u16 maximum value is 0x10000 - 1 == (0x100 - 1) (0x100 + 1)
u8 maximum value is 0x100 - 1
thus the direct conversion requires multiplication/division per
0x100+1
division per 0x100+1 is implemented using 1 term of (1 + x)^-1
MacLaurin expansion
(1+x)^-1 == 1 + (-1) x
a * (1 + 1/256)^-1 * (256^-1) == (a - a / 256) / 256
with integer division rounded toward the nearest.
Massimo Valentini [Sat, 14 Jul 2012 15:07:38 +0000 (17:07 +0200)]
extensions/gggl{,-lies}.c: reduce errors of table-based conversions
centering the sample within the range of floats it represents
Massimo Valentini [Sat, 14 Jul 2012 15:07:38 +0000 (17:07 +0200)]
extensions/gggl.c: move table-based conversions in #ifdef USE_TABLES
and the corresponding not using tables in the #else branch
Massimo Valentini [Sat, 14 Jul 2012 15:07:38 +0000 (17:07 +0200)]
babl: don't write anything if dest model lacks a source component
otherwise converting cairo-RGB24 to R'G'B' overwrites the red
component with the PAD.
Massimo Valentini [Sat, 14 Jul 2012 15:07:37 +0000 (17:07 +0200)]
tests: add a test for conversions cairo-RGB24 <-> R'G'B' u8
Michael Muré [Mon, 25 Jun 2012 10:22:27 +0000 (19:22 +0900)]
index-static.html.in: correct usage example
* babl_fish return a const Babl*
* better naming
Michael Muré [Mon, 25 Jun 2012 10:20:30 +0000 (19:20 +0900)]
index-static.html.in: force utf-8 charset in <head>